package com.example.demo.entity;

public class MyException extends RuntimeException {
    private static final long serialVersionUID = 675793861814805088L;
    private ResultEnum resultEnum;
    private Exception e;
    private String msg;

    public MyException(String msg, ResultEnum resultEnum) {
        this.msg = msg;
        this.resultEnum = resultEnum;
    }

    public MyException(ResultEnum resultEnum) {
        this.resultEnum = resultEnum;
    }

    public MyException(Exception e) {
        this.e = e;
    }

    public MyException(String msg) {
        this.msg = msg;
    }

    public ResultEnum getResultEnum() {
        return resultEnum;
    }

    public Exception getException() {
        return e;
    }

    @Override
    public String getMessage() {
        return this.msg;
    }
}
